@echo off

REM -- Set base dir.
cd ..
set BASE_DIR="%cd%"

REM -- Set LIB folder.
set LIB_FOLDER="%~dp0\bat_script_lib"

REM -- Run GeneralUtil project.
set NAME="GeneralUtil"
set VERSION="0.0.1-SNAPSHOT"
set EXT="jar"
set PROJECT_PATH="%BASE_DIR%\%NAME%"
set PROJECT_NAME="%NAME%-%VERSION%"
call %LIB_FOLDER%\build-maven.bat

REM -- Run MiniCoffeeShopManagementDAO project.
set NAME="MiniCoffeeShopManagementDAO"
set VERSION="0.0.1"
set PROJECT_NAME="%NAME%-%VERSION%"
set EXT="jar"
set PROJECT_PATH="%BASE_DIR%\%NAME%"
call %LIB_FOLDER%\build-maven.bat

REM -- Run MiniCoffeeShopManagementBLL project.
set NAME="MiniCoffeeShopManagementBLL"
set VERSION="0.0.1"
set EXT="jar"
set PROJECT_PATH="%BASE_DIR%\%NAME%"
set PROJECT_NAME="%NAME%-%VERSION%"
call %LIB_FOLDER%\build-maven.bat

REM -- Run MiniCoffeeShopManagementDesktopGUI project.
set NAME="MiniCoffeeShopManagementDesktopGUI"
set VERSION="0.0.1"
set EXT="jar"
set PROJECT_PATH="%BASE_DIR%\%NAME%"
set PROJECT_NAME="%NAME%-%VERSION%"
call %LIB_FOLDER%\build-maven.bat

REM -- Launch DesktopGUI.
cd %PROJECT_PATH%\target\
java -jar %PROJECT_NAME%.%EXT%

pause